[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DEFINING THE MENU
The interface section of the PullTTT5 unit includes a type Pull_Array
which is defined as follows:
CONST
MAX_PULL_TOPICS = 60;
MAX_PULL_WIDTH = 30;
TYPE
PULL_ARRAY = ARRAY[1..MAX_PULL_TOPICS] OF STRING[MAX_PULL_WIDTH];
A variable of type Pull_Array is simply an array of strings that is
used to hold the descriptions of the menu topics. Each string in the
array is loaded with a topic description. The topics are divided into
main topics and sub-topics. The main topic strings must begin with a
backslash character "\".
The strings must be loaded into the array in a specific order. A main
topic is assigned to the first element of the string, e.g.
MYMENU[1] := '\FILE OPTIONS'
The main topic is then followed by the sub-topics that will "pulldown"
when the main topic is selected, e.g.
MYMENU[2] := 'LOAD';
MYMENU[3] := 'SAVE';
MYMENU[4] := 'DELETE';
The next entry in the string array would then be the next main
heading, followed by all the sub-topics within it. This process is
repeated until all the main topics and sub-topics have been defined.
The last sub-topic of the last main heading should be succeeded with a
double backslash topic "\\" to signify the end of the menu definition.
Note: the Toolkit allows null topics within the string array. This
allows a menu to be created with "spare" topics, thereby avoiding the
chore of trying to insert a new topic in the string array when the
menu expands.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson